﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Paypayes.Aelda.Core
{
    public interface IEventPacker
    {
        /// <summary>
        /// Packs an event to an object ready to be sent over the network library.
        /// </summary>
        /// <param name="sevt">The event to pack</param>
        /// <param name="buffer">the buffer that will be sent over the network</param>
        void Pack(SimulationEvent sevt, ref Object buffer);

        /// <summary>
        /// Unpacks an event from an message received from the network library.
        /// </summary>
        /// <param name="buffer">the packet received from the library</param>
        /// <returns>the SimulationEvent that has been unpacked or null if somthing failed.</returns>
        SimulationEvent Unpack(Object buffer);
    }
}
